@*
* Copyright 2016 Yahoo Inc. Licensed under the Apache License, Version 2.0
* See accompanying LICENSE file.
*@
@import scalaz.{\/}
@import kafka.manager.model.ActorModel.ConsumerType
@(cluster:String,
  topic: String,
  errorOrTopicIdentity: kafka.manager.ApiError \/ kafka.manager.model.ActorModel.TopicIdentity,
  optConsumerList: Option[Iterable[(String, ConsumerType)]]
)(implicit af: features.ApplicationFeatures, messages: play.api.i18n.Messages, menus: models.navigation.Menus, request:RequestHeader)

@theMenu = {
    @views.html.navigation.clusterMenu(cluster,"Topic","",menus.clusterMenus(cluster)(
        errorOrTopicIdentity.toOption.map(_.clusterContext.clusterFeatures).getOrElse(kafka.manager.features.ClusterFeatures.default)))
}

@main(
    "Topic Delete Confirm",
    menu = theMenu,
    breadcrumbs=views.html.navigation.breadCrumbs(models.navigation.BreadCrumbs.withNamedViewAndCluster("Topic Delete Confirm",cluster,topic))) {
<div class="col-md-12 un-pad-me">
    <div class="card">
        <div class="card-header">
            <h3><button type="button" class="btn btn-link" onclick="goBack()"><span class="octicon octicon-arrow-left" aria-hidden="true"></span></button>@topic</h3>
        <h3>Are you sure you want to delete @topic?</h3></div></br></br>
        <div class="row">
            <div class="col-md-3"><button type="button" class="btn btn-primary btn-block" onclick="goBack()">No</button></div>
            <div class="col-md-2">
                @b4.vertical.form(routes.Topic.handleDeleteTopic(cluster, topic)) { implicit fc =>
                    <fieldset>
                        @b4.hidden("topic",topic)
                        @b4.submit('class -> "btn btn-primary btn-block"){ Delete Topic }
                    </fieldset>
                }
            </div>
        </div>
        </div>
    </div>
</div>
}
